<% if @user.user_extensions.identity == UserExtensions::TEACHER  %>
	<%= render :partial => 'my_course' %>
<% else %> <!--for student-->
  <%= render :partial => 'my_joinedcourse' %>
<% end %>
<script type="text/javascript" language="javascript">
	$(document).ready(function($) {
		$("#content .content_frame").find("a").attr("target", "_blank");
		$("content-title-top p:first").find("a").attr("target", "_blank");
		$("#content .content_frame [color=#666666]").find("a").removeAttr("target");
		$('#content .content-title-top table[width=580] td:first span:eq(1)').find("a:first").removeAttr("target");
		
	});
</script>

<script type="text/javascript">
$(document).ready(function() {
  var $menu = $('.user_course_list .menu');
  var $li_tags = $menu.find('[mode]');
  var $dyn_list = $('.dyn_list_wrapper');

  $menu.find('[mode]').each(function(index, el) {
    $(el).click(function() {
      mode = $(el).attr('mode');
      $menu.find('[mode]').removeClass( "on" );
      $( this ).addClass( "on" );
      var wrapper = $('[mode='+mode+']')
      $dyn_list.addClass( "hidden" );
      wrapper.removeClass('hidden')
    })
  });
});
</script>